﻿using OneStress.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OneStress.PropertyNodes
{
    internal class PropNodeFactory
    {

        public static PropNodeFactory Instance { get; private set; } = new PropNodeFactory();

        internal AbstractPropNode GetNode(OrgEntity currentOrg)
        {
            switch(currentOrg?.Root.Type-1)
            {
                case 0:
                    return new ProjectNode(currentOrg.Root.Id);
                case 1:
                    return new SiteNode(currentOrg.Root.Id);
                case 2:
                    return new WellNode(currentOrg.Root.Id);
                case 3:
                    return new WellBoreNode(currentOrg.Root.Id);

                default:
                    break;
            }
            return null;
        }
    }
}
